import request from '@/utils/request'

// 查询发现分享列表
export function listShare(query) {
  return request({
    url: '/manage/share/list',
    method: 'get',
    params: query
  })
}

// 查询发现分享详细
export function getShare(shareId) {
  return request({
    url: '/manage/share/' + shareId,
    method: 'get'
  })
}

// 新增发现分享
export function addShare(data) {
  return request({
    url: '/manage/share',
    method: 'post',
    data: data
  })
}

// 修改发现分享
export function updateShare(data) {
  return request({
    url: '/manage/share',
    method: 'put',
    data: data
  })
}

// 删除发现分享
export function delShare(shareId) {
  return request({
    url: '/manage/share/' + shareId,
    method: 'delete'
  })
}

// 查询评论列表
export function listComment(shareId) {
  return request({
    url: '/manage/comment/' + shareId,
    method: 'get'
  })
}

// 新增发现分享
export function insertComment(data) {
  return request({
    url: '/manage/comment',
    method: 'post',
    data: data
  })
}

// 修改发现分享
export function updateComment(data) {
  return request({
    url: '/manage/comment',
    method: 'put',
    data: data
  })
}
